<?php

namespace App\Entities;

use Illuminate\Database\Eloquent\Model;

class QuizPaper extends Model
{
    protected $fillable = [
        'activity_id',
        'uid',
        'user_agent',
        'start_at',
    ];

    protected $casts = [
        'user_agent' => 'json',
    ];

    public function sheets()
    {
        return $this->hasMany(QuizSheet::class, 'paper_id', 'id');
    }
}
